<template>
    <div class="driver"></div>
</template>

<script>
import Driver from "driver.js";
import 'driver.js/dist/driver.min.css'

export default {
    name: "Driver",
    data() {
        return {
            driver: new Driver(),
        }
    },
    mounted() {
        console.log(this.$slots.default)
        this.driver.defineSteps([
            {
                element: '#numberBox',
                popover: {
                    title: '这是组件内容',
                    description: this.$slots.default,
                }
            }, {
                element: '#elInput',
                popover: {
                    title: '<em>这是输入框</em>',
                    description: '输入款的内容是双向绑定的',
                    // description: '<el-input id="elInput" v-model="keyword"></el-input>', error
                }
            },
        ])
        setTimeout(() => {
            this.driver.start();
        }, 1000)
    }
}
</script>

<style scoped>

</style>
